home *** CD-ROM | disk | FTP | other *** search
/ PC Advisor 2011 May / PC Advisor 190 E.iso / pc / ESSENTIALS / VLC Media Player 1.1 / vlc-1.1.5-win32.exe / sdk / include / vlc / plugins / vlc_fs.h < prev    next >
Encoding:
C/C++ Source or Header  |  2010-11-13  |  2.5 KB  |  58 lines

  1. /*****************************************************************************
  2.  * vlc_fs.h: File system helpers
  3.  *****************************************************************************
  4.  * Copyright ┬⌐ 2006-2010 R├⌐mi Denis-Courmont
  5.  *
  6.  * This program is free software; you can redistribute it and/or modify
  7.  * it under the terms of the GNU General Public License as published by
  8.  * the Free Software Foundation; either version 2 of the License, or
  9.  * (at your option) any later version.
  10.  *
  11.  * This program is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  * GNU General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU General Public License
  17.  * along with this program; if not, write to the Free Software
  18.  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  19.  *****************************************************************************/
  20.  
  21. #ifndef VLC_FS_H
  22. #define VLC_FS_H 1
  23.  
  24. /**
  25.  * \file
  26.  * Those functions convert file paths from UTF-8 to the system-specific
  27.  * encoding (especially UTF-16 on Windows). Also, they always mark file
  28.  * descriptor with the close-on-exec flag.
  29.  */
  30.  
  31. #include <sys/types.h>
  32. #include <dirent.h>
  33.  
  34. VLC_EXPORT( int, vlc_open, ( const char *filename, int flags, ... ) LIBVLC_USED );
  35. VLC_EXPORT( FILE *, vlc_fopen, ( const char *filename, const char *mode ) LIBVLC_USED );
  36. VLC_EXPORT( int, vlc_openat, ( int fd, const char *filename, int flags, ... ) LIBVLC_USED );
  37.  
  38. VLC_EXPORT( DIR *, vlc_opendir, ( const char *dirname ) LIBVLC_USED );
  39. VLC_EXPORT( char *, vlc_readdir, ( DIR *dir ) LIBVLC_USED );
  40. VLC_EXPORT( int, vlc_loaddir, ( DIR *dir, char ***namelist, int (*select)( const char * ), int (*compar)( const char **, const char ** ) ) );
  41. VLC_EXPORT( int, vlc_scandir, ( const char *dirname, char ***namelist, int (*select)( const char * ), int (*compar)( const char **, const char ** ) ) );
  42. VLC_EXPORT( int, vlc_mkdir, ( const char *filename, mode_t mode ) );
  43.  
  44. VLC_EXPORT( int, vlc_unlink, ( const char *filename ) );
  45. VLC_EXPORT( int, vlc_rename, ( const char *oldpath, const char *newpath ) );
  46.  
  47. #if defined( WIN32 ) && !defined( UNDER_CE )
  48. # define stat _stati64
  49. #endif
  50.  
  51. VLC_EXPORT( int, vlc_stat, ( const char *filename, struct stat *buf ) );
  52. VLC_EXPORT( int, vlc_lstat, ( const char *filename, struct stat *buf ) );
  53.  
  54. VLC_EXPORT( int, vlc_mkstemp, ( char * ) );
  55.  
  56. VLC_EXPORT( int, vlc_dup, ( int ) );
  57. #endif
  58.